import 'package:flutter/material.dart';


class Settings2Page extends StatelessWidget {

  const Settings2Page({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: ListView(
        // padding: EdgeInsets.symmetric(vertical: 16),
        children: [
          Container(
            padding: EdgeInsets.all(16),
            color: Colors.grey[200],
            child: Row(
              children: [
                CircleAvatar(
                  radius: 40,
                  backgroundImage: AssetImage('assets/profile_image.jpg'),
                ),
                SizedBox(width: 16),
                Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Text(
                      '江上清风山间明月',
                      style: TextStyle(fontSize: 18),
                    ),
                    Text(
                      '用户ID: 123456',
                      style: TextStyle(fontSize: 14, color: Colors.grey),
                    ),
                  ],
                ),
              ],
            ),
          ),
          // SizedBox(height: 16),
          // Container(
          //   color: Colors.grey,
          //   child: SizedBox(
          //     height: 16,
          //     child: Text(
          //       'Hello, SizedBox!',
          //       style: TextStyle(color: Colors.white, fontSize: 10),
          //     ),
          //   ),
          // ),
          SettingItem(icon: Icons.person, title: '个人信息'),
          Divider(indent: 60,),
          SettingItem(icon: Icons.lock, title: '账号与安全'),
          Divider(indent: 60,),
          SettingItem(icon: Icons.notifications, title: '消息通知'),
          Divider(indent: 60,),
          SettingItem(icon: Icons.language, title: '语言'),
          Divider(indent: 60,),
          SettingItem(icon: Icons.language, title: '语言'),
          Divider(indent: 60,),
          SettingItem(icon: Icons.language, title: '语言'),
          Divider(indent: 60,),
          SettingItem(icon: Icons.language, title: '语言'),
          Divider(indent: 60,),
          SettingItem(icon: Icons.language, title: '语言'),
          Divider(indent: 60,),
          // 添加更多的设置项...
        ],
      ),
    );
  }
}

class SettingItem extends StatelessWidget {
  final IconData icon;
  final String title;

  const SettingItem({required this.icon, required this.title,});

  @override
  Widget build(BuildContext context) {
    return ListTile(
      leading: Icon(icon),
      title: Text(title),
      trailing: Icon(Icons.arrow_forward_ios),
      onTap: ()=>{},
    );
  }
}
